#ifndef	_REGIONSCENE_H
#define _REGIONSCENE_H

#include <QGraphicsScene>

class RegionScenePrivate;
class Region;
class RegionGroup;
class RegionScene : public QGraphicsScene
{
	Q_OBJECT

public:
	RegionScene(QObject *parent);
	~RegionScene();
public:
	QUndoStack* undoStack() const;
	void addRegion(Region* item);
	void removeRegion(Region* item);
	QList<Region*> regionItems() const;
	Region* region(const QString& regionUUid);
	QList<Region*> selectedregionItems() const;
	QList<Region*> topLevelregionItems() const;
	RegionGroup* createRegionGroup(const QList<Region*>&);
	void destroyRegionGroup(RegionGroup *);		
	void sendRegionToBack(const QList<Region*>&) const;
	void bringRegionToFront(const QList<Region*>&) const;
signals:
	void regionChanged();
protected:
	QScopedPointer<RegionScenePrivate> d_ptr; 
private:
	Q_DECLARE_PRIVATE(RegionScene)
};
Q_DECLARE_METATYPE(RegionScene*)
#endif // regionItemsCENE_H
